HAL PWR types migration ¶
This section provides information about the HAL PWR types migration .
HAL PWR PVD type definition ¶
|
HAL1 |
HAL2 |
|---|---|
|
PWR_PVDTypeDef |
New usage sequence |
typedef struct
{
uint32_t PVDLevel;
uint32_t Mode;
} PWR_PVDTypeDef;
|
|
Related concept: Remove EXTI Intrinsic Management in System HAL Drivers; Let Users Rely on EXTI HAL Driver.
HAL PWR AVD type definition ¶
|
HAL1 |
HAL2 |
|---|---|
|
PWREx_AVDTypeDef |
New usage sequence |
typedef struct
{
uint32_t AVDLevel;
uint32_t Mode;
} PWR_AVDTypeDef;
|
Note For mode configuration use HAL EXTI to configure the corresponding EXTI_line , they follow the same principles as PVD monitoring. Related use case: ref: hal_pwr_pvd_with_exti_wakeup |
Related concept: Remove EXTI Intrinsic Management in System HAL Drivers; Let Users Rely on EXTI HAL Driver.
HAL PWR PVM type definition ¶
|
HAL1 |
HAL2 |
|---|---|
|
PWR_PVMTypeDef |
New usage sequence |
typedef struct
{
uint32_t PVMType;
uint32_t Mode;
} PWR_AVDTypeDef;
|
Note For mode configuration use HAL EXTI to configure the corresponding EXTI_line, they follow the same principles as PVD monitoring. Related use case: ref: hal_pwr_pvd_with_exti_wakeup |
Related concept: Remove EXTI Intrinsic Management in System HAL Drivers; Let Users Rely on EXTI HAL Driver.
HAL PWR wake-up pin type definition ¶
|
HAL1 |
HAL2 |
|---|---|
|
PWREx_WakeupPinTypeDef |
New usage sequence |
typedef struct
{
uint32_t WakeUpPin;
uint32_t PinPolarity;
uint32_t PinPull;
} PWREx_WakeupPinTypeDef;
|
list of possible values to use instead of AVDLevel momber : /*WakeUpPin list of possible values*/
#define HAL_PWR_WAKEUP_PIN_1 LL_PWR_WAKEUP_PIN1
#define HAL_PWR_WAKEUP_PIN_2 LL_PWR_WAKEUP_PIN2
#define HAL_PWR_WAKEUP_PIN_3 LL_PWR_WAKEUP_PIN3
...
/*PinPolarity list of possible values*/
typedef enum
{
HAL_PWR_WAKEUP_PIN_POLARITY_LOW = LL_PWR_WAKEUP_PIN_POLARITY_LOW,
HAL_PWR_WAKEUP_PIN_POLARITY_HIGH = LL_PWR_WAKEUP_PIN_POLARITY_HIGH
} hal_pwr_wakeup_pin_polarity_t;
/*PinPull list of possible values*/
typedef enum
{
HAL_PWR_GPIO_NOPULL = 0U,
HAL_PWR_GPIO_PULLUP = 1U,
HAL_PWR_GPIO_PULLDOWN = 2U
} hal_pwr_gpio_pull_t;
|
Related concept: Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions).